-
Notifications
You must be signed in to change notification settings - Fork 902
[WIP] New FastNoiseModelFactor with more efficient linearization #2275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new FastNoiseModelFactorN class as an optimized alternative to the existing NoiseModelFactorN for more efficient linearization in GTSAM. The implementation aims to achieve approximately 10% performance improvement in linearization operations.
- Complete implementation of
FastNoiseModelFactorNwith optimized linearization usingVerticalBlockMatrix - Migration of
PriorFactorto use the new fast factor implementation - API adjustments to support Eigen::Ref-based Jacobian handling for better memory management
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gtsam/nonlinear/FastNoiseModelFactorN.h | New optimized factor implementation with direct VerticalBlockMatrix linearization |
| gtsam/nonlinear/PriorFactor.h | Migration from NoiseModelFactorN to FastNoiseModelFactorN base class |
| gtsam/slam/tests/testPriorFactor.cpp | Updated test to use new evaluateError signature with nullptr parameter |
| gtsam/linear/NoiseModel.h | API changes to support Eigen::Block instead of Eigen::Block |
| gtsam/linear/JacobianFactor.h | Simplified constructor template for better move semantics |
| gtsam/linear/JacobianFactor-inl.h | Unified constructor implementation with perfect forwarding |
| gtsam/linear/GaussianConditional.cpp | Optimization to use std::move for VerticalBlockMatrix |
| gtsam/navigation/ImuBias.cpp | Added .eval() calls to fix potential Eigen expression template issues |
| gtsam/base/OptionalJacobian.h | New constructor overload for Eigen::Ref support |
|
Fan, I hope you saw that the CI fails. This could be due to unrelated changes you made. Maybe those should be a separate PR :-) i’m wondering whether it is necessary to have a completely new class or whether we can just have a different method to overload. Then we can deprecate the old method and publicize the new method. And this PR would also have much smaller change and be easier to review. |
b6908be to
775ce42
Compare
775ce42 to
374632c
Compare
|
@ProfFan Let's talk Monday about my comment and whether that's a good or a bad idea, and why... |
|
We should revive this so that we can be even faster |
About 10% faster in linearization with my microbenchmarks. I think there is still a large margin for optimization, but we should focus more on the linear solver...